function hesse = hesse2s(func, x)
    syms x1 x2;
    hesse = subs([diff(func, x1, 2),  diff(diff(func, x1), x2);...
                  diff(diff(func, x2), x1), diff(func, x2, 2)], {x1,x2}, x);


end

